<!--///////////////////////////////////////////////////////////
//                         _ooOoo_                           //
//                        o8888888o                          //
//                        88" . "88                          //
//                        (| ^_^ |)                          //
//                        O\  =  /O                          //
//                     ____/`---'\____                       //
//                   .'  \\|     |//  `.                     //
//                  /  \\|||  :  |||//  \                    //
//                 /  _||||| -:- |||||-  \                   //
//                 |   | \\\  -  /// |   |                   //
//                 | \_|  ''\---/''  |   |                   //
//                 \  .-\__  `-`  ___/-. /                   //
//               ___`. .'  /--.--\  `. . ___                 //
//             ."" '<  `.___\_<|>_/___.'  >'"".              //
//           | | :  `- \`.;`\ _ /`;.`/ - ` : | |             //
//           \  \ `-.   \_ __\ /__ _/   .-` /  /             //
//     ========`-.____`-.___\_____/___.-`____.-'========     //
//                          `=---='                          //
//     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^     //
//          佛祖保佑         永无BUG         永不修改        //
///////////////////////////////////////////////////////////////-->
<!--余生网络信息 酷享云支付系统 作者：余生 QQ：2316803263 盗版必究 购买正版请联系作者 盗版有风险-->
<?php
$is_defend=true;
include("../includes/common.php"); 
if($conf['is_reg']==0)sysmsg('未开放商户申请');
if($conf['user_kai']==1)sysmsg($conf['user_kail']);
?>
<!DOCTYPE html>
<html class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><?php echo $conf['web_name']?>-会员中心登陆</title>
<meta name="keywords" content="<?php echo $conf['web_name']?>,彩虹易支付,,<?php echo $conf['web_name']?>,云支付,免签约支付接口" />
    <meta name="description" content="<?php echo $conf['web_name']?> 酷享云支付" />
    <link href="/user/login/css/backend.min.css?v=442212212" rel="stylesheet">
    <link rel="stylesheet" href="/user/login/css/bootstrap.min.css">
    <link rel="stylesheet" href="/user/login/css/icons.css">
    <link rel="stylesheet" href="/user/login/css/main.css">
    <link rel="stylesheet" href="/user/login/css/responsive.css">
    <link rel="stylesheet" href="/user/login/fontspay/iconfont.css">
    <style type="text/css">
      .container a {
          color: white!important;
        }
        .container p{
          color: white!important;
        }
        .msg-box {
            display: none!important;
        }
    </style>
</head>
<body>
<div class="account-user-sec" style="background-image: url(/user/login/images/2f5bb2f5ef0e64eaf82a59f271dd0018.jpg);">
 <div class="account-sec">
          <div class="account-top-bar"  style="color:white">
               <div class="container">
                     <div class="logo">
                       <a href="javascript:void(0)" title="" ><i class="fa fa-bullseye" style="color: white"></i> <?php echo $conf['web_name']?></a>
                   </div>
                   <ul class="account-header-link">
                    <li><a title="" href="http://wpa.qq.com/msgrd?v=3&uin=<?php echo $conf['web_qq']?>&site=qq&menu=yes"><b>客服QQ：<?php echo $conf['web_qq']?></b></a></li>
                    <li><a href="./login.php"><b>登陆</b></a></li>
                    <li><a href="/"><b>首页</b></a></li>
                   </ul>
               </div>
          </div>
          <div class="acount-sec">
               <div class="container">
                    <div class="row">
                         <div class="col-md-12">
                              <div class="contact-sec">
                                   <div class="row">
                                        <div class="col-md-8">   
                                             <div class="widget-title">
                                                  <h3>会员注册 </h3>
                                             </div>
                                             <div class="account-form">
                                            <form method="post">                            
                                                       <div class="row">
                                                            <div class="col-md-6 feild">
                                                                <input type="text" id="name" autocomplete="off" name="name" data-rule="required;name" placeholder="用户名 用户名必须11位手机号码">
                                                            </div>
                                                            <div class="col-md-6 feild">
                                                                <input type="password" id="pwd" autocomplete="off" name="pwd" data-rule="required;pwd" placeholder="密码 密码必须6-30个字符">
                                                            </div>
                                                            <div class="col-md-6 feild">
                                                                <input type="text" id="phone" autocomplete="off" name="phone" data-rule="required;phone" placeholder="手机号">
                                                            </div>
                                                            <div class="col-md-6 feild">
                                                                 <input type="text" name="url" autocomplete="off" id="url" data-rule="required;url" placeholder="网站域名">
                                                            </div>

                                                             <div class="col-md-6 feild">
                                                                 <input type="text" name="email" autocomplete="off" id="email" data-rule="required;email" placeholder="邮箱">
                                                            </div>
                                                         
                                          
                                                            <div class="col-md-6 feild">
                                                                <div class="row">
                                                                  <div class="col-md-7 col-xs-7 col-sm-7 feild" style="padding-right: 0px;">
                                                                    <input type="text" name="code" id="code" placeholder="邮箱验证码" required>
                                                                    </div>
                                                                    <div class="col-md-5 col-xs-5 col-sm-5" style="padding-left: 0px;"> 
                                                                 <input type="button" id="sendcode"  class="btn btn-info btn-lg btn-block btn-captcha" style="border-radius: 0px;" value="获取验证码" onclick="codeButton()" required>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                            <div class="col-md-6 feild">
                                                            <input type="text" name="uid" autocomplete="off" id="uid" placeholder="邀请人商户ID(没有请留空)" value="<?php echo $_GET['geid']; ?>">
                                                            </div>
                                                            <div class="col-md-6 feild">
                                                                <div class="row">
                                                                    <div class="col-md-7 col-xs-7 col-sm-7 feild" style="padding-right: 0px;">
                                                                        <input type="text" name="captcha" placeholder="验证码" data-rule="required;length(4)" style="border-radius: 0;" autocomplete="off" />
                                                                    </div>
                                                                <div class="col-md-5 col-xs-5 col-sm-5 feild" style="padding-left: 0px;">
                                                                <img src="./code.php?r=<?php echo time()?>"  style="height: 45px; width: 100%;" onclick="this.src='./code.php?r='+Math.random();">
                                                                    </div>
                                                                </div>
                                                            </div>
                                                             
                                                              <div class="col-md-4 feild">
                                                           <select id="withdraw_type" autocomplete="off" name="type" data-rule="required;" style="border: 1px solid #e6eaea; float: left; font-size: 13px; letter-spacing: 0.5px; margin-bottom: 10px; padding: 13px 30px; width: 100%;">
                                                                 <?php if($conf['stype_1']){?><option value="1">支付宝结算</option>
                                                                 <?php }if($conf['stype_2']){?><option value="2">微信结算</option>
                                                                 <?php }if($conf['stype_3']){?><option value="3">QQ钱包结算</option>
                                                                 <?php }if($conf['stype_4']){?><option value="4">银行卡结算</option>
                                                                 <?php }?></select>
                                                          </select>
                                                            </div>
                                                          <div class="col-md-4 feild">
                                                         <input type="text" id="account" autocomplete="off" name="account" data-rule="required;" placeholder="结算账号">
                                                            </div>
                                                        <div class="col-md-4 feild">
                                                         <input type="text" id="username" autocomplete="off" name="username" data-rule="required;" placeholder="真实姓名">
                                                            </div> 

                                                            <?php if ( is_mobile() ) { ?>

                                                            <div class="col-md-12">  
                                                            <div class="alert alert-danger" style="margin-bottom: 0px;">                            温馨提示1：支付宝和微信收款的姓名必须填写实名认证的身份证的真实姓名                      </div>                                                            
                                                            </div>
                                                            <div class="col-md-12">

                                                            <?php if($conf['is_payreg']==1 && empty($userrow['is_payreg'])){?>
                                                                 <div class="alert alert-success" style="margin-bottom: 0px;">注册费用：<?php echo $conf['reg_price']?>元 - 支付方式：
                                                              <select data-rule="required;" name="typepay" style="color: black;" > 
                                                                        <option value="alipay">支付宝</option>
                                                                        <option value="wxpay">微信</option>
                                                                        <option value="qqpay">QQ钱包</option>
                                                                    </select>
                                                                 <!--  &ensp; &ensp; &ensp; &ensp; &ensp; &ensp; &ensp; <input  type="checkbox" id="agreement" value=""><span>已阅读并同意<a href="agreement.html" target="_blank"><span class="lan">《<?php echo $conf['web_name'] ?>使用协议》</span></a></span> -->
                                                                </div>
                                                               <?php }else{?>
                                                                <div class="alert alert-success" style="margin-bottom: 0px;">注册费用：本站已经开启限时免费注册 - 支付方式：
                                                                <select data-rule="required;" name="typepay" style="color: black;" > 
                                                                        <option value="alipay">支付宝</option>
                                                                        <option value="wxpay">微信</option>
                                                                        <option value="qqpay">QQ钱包</option>
                                                                    </select>
                                                                 <!--  &ensp; &ensp; &ensp; &ensp; &ensp; &ensp; &ensp; <input  type="checkbox" id="agreement" value=""><span>已阅读并同意<a href="agreement.html" target="_blank"><span class="lan">《<?php echo $conf['web_name'] ?>使用协议》</span></a></span> -->
                                                                </div>
                                                                 <?php }?>
                                                            </div>
                                                         
                                                         <div class="feild col-md-12">
                                                         <button type="button" id="submit" ng-click="login()" style="width: 100%;margin-top: 13px;background: #3c3c3c none repeat ">确认注册</button>
                                                            </div>
                                                        </div>
                                                  </form>
                                             </div>
                                        </div>
                                    <div class="col-md-4">
                                <div class="creat-an-account" style="margin-top: 10px;">
                                 <span style="text-align: center;">OR</span>

                  <a href="./login.php" style="background: #10b5e8 none repeat ;width: 50%;text-align: center;margin-top: 10px;"><i class="fa fa-user"></i> 点击登陆</a>

                 <?php if ($conf['quicklogin']==1) {
                    echo '<a href="oauth.php" style="width: 50%; height:46px; text-align: center;margin-top: 10px;"><i class="iconfont" style="background: #10b5e8 none repeat;">&#xe60a;</i>支付宝登陆</a>';
                }elseif ($conf['quicklogin']==2) {
                  echo '<a href="connect.php" style="width: 50%;text-align: center;margin-top: 10px;"><i class="fa fa-qq" style="background: #4e8deb;"></i>QQ登陆</a>';
                }else{
                 echo '<a href="oauth.php" style="width: 50%; height:46px; text-align: center;margin-top: 10px;"><i class="iconfont" style="background: #10b5e8 none repeat;">&#xe60a;</i>支付宝登陆</a>';
                }
                  ?>
             </div>
                 </div>
                       </div>
                              </div>
                         </div>
                    </div>
               </div>
          </div>
          <footer style="margin-top: 10px;padding-left: 0px;">
              <div class="container">
                  <p><?php echo $conf['ban']?><i class="fa fa-heart"></i></p>
              </div>
          </footer>
     </div>
</div>
                  <?PHP }else{  ?>                             
                               <div class="col-md-12">  
                    <div class="alert alert-danger" style="margin-bottom: 0px;">                            温馨提示1：支付宝和微信收款的姓名必须填写实名认证的身份证的真实姓名</div>                                                            
                           </div>
                   <div class="col-md-12">

                                                            <?php if($conf['is_payreg']==1 && empty($userrow['is_payreg'])){?>
                                                                 <div class="alert alert-success" style="margin-bottom: 0px;">注册费用：<?php echo $conf['reg_price']?>元 - 支付方式：
                                                              <select data-rule="required;" name="typepay" style="width: 10%;color: black;" > 
                                                                        <option value="alipay">支付宝</option>
                                                                        <option value="wxpay">微信</option>
                                                                        <option value="qqpay">QQ钱包</option>
                                                                    </select>
                                                                 <!--  &ensp; &ensp; &ensp; &ensp; &ensp; &ensp; &ensp; <input  type="checkbox" id="agreement" value=""><span>已阅读并同意<a href="agreement.html" target="_blank"><span class="lan">《<?php echo $conf['web_name'] ?>使用协议》</span></a></span> -->
                                                                </div>
                                                               <?php }else{?>
                                                                <div class="alert alert-success" style="margin-bottom: 0px;">注册费用：本站已经开启限时免费注册 - 支付方式：
                                                                <select data-rule="required;" name="typepay" style="width: 10%;color: black;" > 
                                                                        <option value="alipay">支付宝</option>
                                                                        <option value="wxpay">微信</option>
                                                                        <option value="qqpay">QQ钱包</option>
                                                                    </select>
                                                                 <!--  &ensp; &ensp; &ensp; &ensp; &ensp; &ensp; &ensp; <input  type="checkbox" id="agreement" value=""><span>已阅读并同意<a href="agreement.html" target="_blank"><span class="lan">《<?php echo $conf['web_name'] ?>使用协议》</span></a></span> -->
                                                                </div>
                                                                 <?php }?>
                                                            </div>
                                                         
                                                         <div class="feild col-md-12">
                                                         <button type="button" id="submit" ng-click="login()" style="width: 100%;margin-top: 13px;background: #3c3c3c none repeat ">确认注册</button>
                                                            </div>
                                                        </div>
                                                  </form>
                                             </div>

                                             <div class="more-option">
                                                  <span>OR</span>
                                             </div>
                                        </div>
                                    <div class="col-md-4">
                                <div class="creat-an-account" style="">
                                <span>已有账号？</span>

              <a href="./login.php" style="background: #10b5e8 none repeat ;"><i class="fa fa-user" style=""></i> 点击登陆</a>
              <h4>更多方式</h4>
            <ul>

           <?php if ($conf['quicklogin']==1) {
                    echo '<li><a href="oauth.php" title=""><span class="iconfont" style="background: #4e8deb;">&#xe60a;</span></a></li>';
                }elseif ($conf['quicklogin']==2) {
                  echo '<li><a href="connect.php" title=""><i class="fa fa-qq" style="background: #4e8deb;"></i></a></li>';
                }else{
                  echo '<li><a href="oauth.php" title=""><span class="iconfont" style="background: #4e8deb;">&#xe60a;</span></a></li>';
                }
             ?>
          </ul>
             </div>
                                        </div>
                                   </div>
                              </div>
                         </div>
                    </div>
               </div>
          </div>
          <footer style="margin-top: 10px;padding-left: 0px;">
              <div class="container">
                  <p><?php echo $conf['ban']?><i class="fa fa-heart"></i></p>
              </div>
          </footer>
     </div>
</div>
<?PHP } ?>
<script src="https://template.down.swap.wang/ui/angulr_2.0.1/bower_components/jquery/dist/jquery.min.js"></script>
<script src="https://template.down.swap.wang/ui/angulr_2.0.1/bower_components/bootstrap/dist/js/bootstrap.js"></script>
<script src="//cdn.bootcss.com/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
<script src="../assets/layer/layer.js"></script>
<script src="//static.geetest.com/static/tools/gt.js"></script>
<script src="http://code.jquery.com/jquery-latest.js"></script> 
<script>
layer.open({
  title: '友情提示：'
 ,content: '<?php echo $conf['user_gong']?>'
});
</script>
<script type="text/javascript">
  function codeButton(){
    var code = $("#sendcode");
    if ($(this).attr("data-lock") === "true") return;
    var email=$("input[name='email']").val();
    if(email==''){layer.msg('邮箱不能为空！');return false;}
    var reg = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/;
    if(!reg.test(email)){layer.msg('邮箱格式不正确！');return false;}
     code.attr("disabled","disabled");
      setTimeout(function(){
        code.css("opacity","0.8");
      },1000)
    var ii = layer.load(2, {shade:[0.1,'#fff']});
    $.ajax({
      type : "POST",
      url : "ajax.php?act=sendcode",
      data : {email:email},
      dataType : 'json',
      success : function(data) {
        layer.close(ii);
        if(data.code == 0){
      var time = 60;
      var set=setInterval(function(){
      code.val("("+--time+")秒后获取");
      }, 1000);
      setTimeout(function(){
      code.attr("disabled",false).val("获取验证码");
      clearInterval(set);
      }, 60000);
      layer.msg('发送成功，请注意查收！');
        }else{
      var time = 60;
      var set=setInterval(function(){
      code.val("("+--time+")秒后获取");
      }, 1000);
      setTimeout(function(){
      code.attr("disabled",false).val("获取验证码");
      clearInterval(set);
      }, 60000);
          layer.alert(data.msg);
        }
      } 
    });   
  }
</script>
<script>
$(document).ready(function(){
  $("select[name='type']").change(function(){
    if($(this).val() == 1){
      $("input[name='account']").attr("placeholder","支付宝账号");
    }else if($(this).val() == 2){
      $("input[name='account']").attr("placeholder","微信号");
    }else if($(this).val() == 3){
      $("input[name='account']").attr("placeholder","QQ号");
    }else if($(this).val() == 4){
      $("input[name='account']").attr("placeholder","银行卡号");
    }
  });
  $("select[name='type']").change();
  $("#submit").click(function(){
    if ($(this).attr("data-lock") === "true") return;
    var sitename=$("input[name='sitename']").val();
    var type=$("select[name='type']").val();
    var name=$("input[name='name']").val();
    var pwd=$("input[name='pwd']").val();
    var account=$("input[name='account']").val();
    var username=$("input[name='username']").val();
    var url=$("input[name='url']").val();
    var email=$("input[name='email']").val();
    var phone=$("input[name='phone']").val();
    var code=$("input[name='code']").val();
    var uid=$("input[name='uid']").val();
    var captcha=$("input[name='captcha']").val();
    var typepay=$("select[name='typepay']").val();
    if(name=='' || pwd=='' || account=='' || username=='' || url=='' || email=='' || phone=='' || code==''|| captcha==''){layer.msg('请确保各项不能为空！');return false;}
    var reg = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/;
    if(!reg.test(email)){layer.msg('邮箱格式不正确！');return false;}
    if (url.indexOf(" ")>=0){
      url = url.replace(/ /g,"");
    }
    if (url.toLowerCase().indexOf("http://")==0){
      url = url.slice(7);
    }
    if (url.toLowerCase().indexOf("https://")==0){
      url = url.slice(8);
    }
    if (url.slice(url.length-1)=="/"){
      url = url.slice(0,url.length-1);
    }
    $("input[name='url']").val(url);
    var ii = layer.load(2, {shade:[0.1,'#fff']});
    $(this).attr("data-lock", "true");
    $.ajax({
      type : "POST",
      url : "ajax.php?act=reg",
      data : {type:type,name:name,pwd:pwd,account:account,username:username,url:url,email:email,phone:phone,code:code,sitename:sitename,uid:uid,captcha:captcha,typepay:typepay},
      dataType : 'json',
      success : function(data) {
        $("#submit").attr("data-lock", "false");
        layer.close(ii);
        if(data.code == 1){
           layer.alert('商户申请成功!商户ID'+data.pid+'商户秘钥：'+data.key+'');
          var mch_info = data.pid+"|"+data.key;
          $.cookie('mch_info', mch_info);
        }else if(data.code == 2){
          layer.alert('付费注册跳转!');location.href='../submit2.php?type='+data.typepay+'&trade_no=' + data.trade_no+'';
        }else if(data.code ==3){
          layer.msg(data.msg); 
        }else{
          layer.msg(data.msg);
        }
      }
    });
  });
  $.ajax({
    // 获取id，challenge，success（是否启用failback）
    url: "ajax.php?act=captcha&t=" + (new Date()).getTime(), // 加随机数防止缓存
    type: "get",
    dataType: "json",
    success: function (data) {
      console.log(data);
      // 使用initGeetest接口
      // 参数1：配置参数
      // 参数2：回调，回调的第一个参数验证码对象，之后可以使用它做appendTo之类的事件
      initGeetest({
        width: '100%',
        gt: data.gt,
        challenge: data.challenge,
        new_captcha: data.new_captcha,
        product: "bind", // 产品形式，包括：float，embed，popup。注意只对PC版验证码有效
        offline: !data.success // 表示用户后台检测极验服务器是否宕机，一般不需要关注
        // 更多配置参数请参见：http://www.geetest.com/install/sections/idx-client-sdk.html#config
      });
    }
  });
});

</script>

</body>
</html>
